<extend name="Base/base" />
<block name="css">

</block>

<block name="content">
<div class="page-header">
	<h1>
		权限管理
		<small>
			<i class="icon-double-angle-right"></i>
			添加权限规则
		</small>
	</h1>
</div><!-- /.page-header -->
<div class="row">
	<div class="vspace-sm-6"></div>

	<div class="col-sm-12">
		<div class="tabbable">
			<ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
				<li class="">
					<a data-toggle="tab" href="#home4">网站基本配置</a>
				</li>

				<li class="">
					<a data-toggle="tab" href="#profile4">Profile</a>
				</li>

				<li class="active">
					<a data-toggle="tab" href="#dropdown14">More</a>
				</li>
			</ul>

			<div class="tab-content">
				<div id="home4" class="tab-pane">
					<!-- <p>Raw denim you probably haven't heard of them jean shorts Austin.</p> -->
					<!-- 页面 内容 开始 -->
					<form class="form-horizontal" role="form" id="website_form">
						<!-- 规则名称 -->
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1">站点名称： </label>

							<div class="col-sm-9">
								<input value="{$website_info['web_name']}" name="web_name" type="text" id="form-field-1"  class="col-xs-10 col-sm-5" />
							</div>
						</div>
						<div class="space-4"></div>
						<!-- 规格方法 -->
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 站点描述： </label>

							<div class="col-sm-9">
								<input value="{$website_info['web_desc']}" name="web_desc" type="text" id="form-field-1" class="col-xs-10 col-sm-5" />
								<span class="help-inline col-xs-12 col-sm-7">
									<span class="middle">以半角逗号","分隔多个关键字</span>
								</span>
							</div>
						</div>
						<div class="space-4"></div>
						<!-- 关键词 -->
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 关键词： </label>

							<div class="col-sm-9">
								<input value="{$website_info['web_keywords']}" name="web_keywords" type="text" id="form-field-1" class="col-xs-10 col-sm-10" />
								<span class="help-inline col-xs-12 col-sm-7">
									<span class="middle">以半角逗号","分隔多个关键字</span>
								</span>
							</div>
						</div>
						<div class="space-4"></div>
						<!-- 是否允许注册： -->
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否允许注册 </label>

							<div class="col-sm-9">
								<div class="radio">
									<label>
										<!-- 默认为开启状态 -->
										<input value="yes" <if condition="$website_info['web_isRegister'] eq 'yes'"> checked="checked" </if> name="web_isRegister" type="radio" class="ace" />
										<span class="lbl"> 开启</span>
									</label>
									&nbsp;&nbsp;
									<label>
										<input value="no" <if condition="$website_info['web_isRegister'] eq 'no'"> checked="checked" </if> name="web_isRegister" type="radio" class="ace" />
										<span class="lbl"> 关闭</span>
									</label>
								</div>
							</div>
						</div>
						<div class="space-4"></div>
						<!-- 规格类型 -->
						<!-- 规格条件 -->

						<div class="clearfix form-actions">
							<div class="col-md-offset-3 col-md-9">
								<button class="btn btn-info" type="button" id="update_base">
									<i class="icon-ok bigger-110"></i>
									更新配置
								</button>
							</div>
						</div>
					</form>
					<!-- PAGE CONTENT ENDS -->
				</div>

				<div id="profile4" class="tab-pane">
					<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid.</p>
				</div>

				<div id="dropdown14" class="tab-pane active">
					<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade.</p>
				</div>
			</div>
		</div>
	</div><!-- /span -->
</div>
<div class="row">
	<div class="col-xs-12">
		<!-- 页面 内容 开始 -->
		<form class="form-horizontal" role="form" id="add_form">
			<!-- 权限规则分类 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 权限规则： </label>
				<div class="col-sm-5">
					<select name="pid" class="form-control" id="form-field-select-1">
						<option value="0">新的规则组</option>
						<option value="33">Alabama</option>
						<option value="44">Virginia</option>
					</select>
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规则名称 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规则名称： </label>

				<div class="col-sm-9">
					<input name="title" type="text" id="form-field-1" placeholder="如：添加xx,xx列表" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规格方法 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规则方法： </label>

				<div class="col-sm-9">
					<input name="name" type="text" id="form-field-1" placeholder="如：admin/rule/add" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规格状态 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规格状态： </label>

				<div class="col-sm-9">
					<div class="radio">
						<label>
							<!-- 默认为开启状态 -->
							<input value="1" checked="checked"  name="status" type="radio" class="ace" />
							<span class="lbl"> 开启</span>
						</label>
						&nbsp;&nbsp;
						<label>
							<input value="0" name="status" type="radio" class="ace" />
							<span class="lbl"> 关闭</span>
						</label>
					</div>
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规格类型 -->
			<!-- 规格条件 -->

			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info" type="button" id="add-submit">
						<i class="icon-ok bigger-110"></i>
						Submit
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset">
						<i class="icon-undo bigger-110"></i>
						Reset
					</button>
				</div>
			</div>
		</form>
		<!-- PAGE CONTENT ENDS -->
	</div><!-- /.col -->
</div><!-- /.row -->
</block>

<block name="js">

	<script>
		var SCOPE = {
			"add_url" : "{:U('Base/index')}",
			"success_url" : "{:U('Base/index')}"
		};
		$("#update_base").click(function(){
			var data = $("#website_form").serialize();
			$.ajax({
				url:SCOPE.add_url,
				data:data,
				type:"POST",
				dataType:"JSON",
				success:function(res){
					if (res.status == 1) {
						dialog.showMessage("更新成功", 6);
					}
				}
			});
		});
	</script>
</block>